from PyQt4 import QtGui

class About(QtGui.QDialog):
    
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.setWindowTitle('About PyTv!')
        v_box = QtGui.QVBoxLayout(self)
        
        pixmap = QtGui.QPixmap(parent.pytv.images['pytv'])
        labIcon = QtGui.QLabel('')
        labIcon.setPixmap(pixmap)
        v_box.addWidget(labIcon)
        v_box.addWidget(QtGui.QLabel('PyTv is a Notification tool for Tv Shows.\n'\
                        'Enter the name of the Show and PyTv will search for the\n'\
                        'Air Date Calendar and will emit a notification when a new\n'\
                        'episode is released.'))
        v_box.addWidget(QtGui.QLabel('Version: 2.2'))
        v_box.addWidget(QtGui.QLabel('Developed by: Diego Sarmentero'))
        v_box.addWidget(QtGui.QLabel('Website: http://pytv-series.googlecode.com'))
        
    def closeEvent(self, event):
        event.ignore()
        self.done(0)
